﻿using System.Configuration;
using System.Data;
using System.Windows;

namespace LeiDacceshi
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
        System.Threading.Mutex? mutex;
        public App()
        {
            this.Startup += new StartupEventHandler(App_Startup);
            this.Exit += (s, e) => { System.Environment.Exit(0); };
        }

        void App_Startup(object sender, StartupEventArgs e)
        {
            bool ret;
            mutex = new System.Threading.Mutex(true, "互动软件", out ret);
            if (!ret)
            { 
                Environment.Exit(0);
            }
        }
    }

}
